package cn.itsource.controller;

import cn.itsource.service.FileService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

@RestController
public class FileController {

    @Autowired
    FileService fileService;

    @PostMapping("file/upload")
    public String fileUpload(@RequestParam("fileName") MultipartFile multipartFile){

        return fileService.fileUpload(multipartFile);
    }

}
